The present invention relates to a magnetic sensor adjusting method, a magnetic sensor adjusting device and the magnetic sensor itself.
Some rotational sensors and length measuring sensors use magnetic sensors. Among various types of magnetic sensors, some magnetic sensors use a method in which a magnetic sensing target that rotates or moves along with a sensing object is disposed in a magnetic field, a variation of the magnetic field, according to the movement of the magnetic sensing target, is detected by a magnetic field detecting element such as a magnetoresistance effect element (MR element: JP-A-11-304,414 and JP-A-11-237,256) and a Hall element (JP-A-10-103,145) and, then, a rotation angle or a moving distance of the magnetic sensing target is calculated using the detected waveforms. Such a magnetic sensor is used because it has a relatively simple construction and high accuracy. For example, there is known a magnetic sensor for automobiles, that detects crank angles and the like by disposing a gear made of a soft magnetic material that has concave and convex portions formed on a outer circumferential surface so that it is opposed to a magnetic field generating magnet so as to create a magnetic gap therebetween, disposing a magnetic field detecting element (an MR element is often used because it is inexpensive and can be miniaturized easily) in the magnetic gap and, then, detecting a rotational position of the gear according to the output waveform of the magnetic field detecting element (JP-A-11-304,414 and JP-A-11-237,256). As the concave and convex portions form, with the magnetic field detecting element, respective sensing gap lengths that differ from each other, significant fluctuations occur in the magnetic field in the magnetic gap and, in particular, when the boundary regions between the concave and convex portions pass through the magnetic gap, which appear as variations in the waveform level detected by the magnetic detecting element. In actual sensors, this waveform is binarized (turned into a square wave) by a comparator and the like and the rotational position is determined based on the level transition edges.
Here, if the sensing gap lengths formed between the gear and the magnet are uneven between sensors due to factors such as errors in attachment or if the heights of the concave and convex portions in one gear are uneven due to the accuracy of finishing the gear and other factors, there may occur a problem that angle detection accuracy is degraded. Further, eccentricity of the rotation axis of the gear may also cause fluctuations in the sensing gap length according to the angular phase. More specifically, as the sensing gap becomes larger, the transition of the waveform level becomes less sharp when the boundary regions, between the concave and convex portions of the gear, pass through the sensing gap and, conversely, as the sensing gap becomes smaller, the transition of the waveform level becomes sharper. As a consequence, positions of the transition edges after binarization become irregular depending on the sensing gap length and, thus, the accuracy in detecting rotational positions is degraded. Such problem occurs not only in the rotational sensors but also in the length measuring sensors and, further, sensors using sensing targets other than the concave and convex portions (for example, when magnetic rotors or magnetic scales are used, regions having polarities opposite to each other that are disposed alternately substitute for the role of the concave and convex portions) in a similar manner.
JP-A-10-103,145 addresses this problem as follows. Even if the waveform before binarization fluctuates due to the unevenness of the sensing gap length, in terms of one pair of the concave and convex portions, the accuracy of the waveform cycle can be maintained so long as dimensional accuracy, in forming the concave and convex portions, is ensured. In this case, in the waveform after the binarization, the repetition period between a first level segment corresponding to the convex portion and a second level segment corresponding to the concave portion is constant in itself. Therefore, among the transition edges (binarized edges) between the first level segment and the second level segment, by adopting only one of either the rising edge and the falling edge as the sensing signal, the angle sensing accuracy can be assured by the dimensional accuracy in forming the concave and convex portions.
However, the above solution has the following problems:
(1) in the above solution, though the repetition period of the waveform is constant in itself, the phase of the binarized edge positions is irregular depending on the shape of the waveform and, therefore, does not uniquely correspond to the concavo-convex phase of the gear. It becomes a serious problem when the phase of attachment of the gear to the sensing object must be managed. For example, in the case of an angle sensor for detecting a crank angle of automobiles, if the gear is attached with respect to the concavo-convex phase, the irregularity of the phase of the binarized edge positions described above may adversely affect operations such as ignition timing control that is performed referentially; and
(2) because only one of the rising edge and the falling edge formed in the binarized waveform can be adopted, resolution of the angle sensing is reduced significantly in comparison with other solutions using both edges. Conversely, in order to implement the resolution comparable to the other solutions using both edges, the number of the concave and convex portions must be doubled but, as a result, the cost of machining the gear is increased and it becomes difficult to ensure the accuracy.
It is an object of the present invention to provide a magnetic sensor adjusting method that solves the above problems, a magnetic sensor adjusting device used for the method and the magnetic sensor.
It is another object of the present invention to provide a magnetic sensor adjusting method that can always be accurate in sensing a sensing target satisfactorily irrespective of fluctuations of a sensing gap length that may occur between different magnetic sensor products or in one magnetic sensor product, a magnetic sensor adjusting device used for the method and the magnetic sensor.
It is yet another object of the present invention to provide a magnetic sensor adjusting method that can prevent an irregularity of a phase of a binarized waveform edge, a magnetic sensor adjusting device used for the method and the magnetic sensor.
It is yet another object of the present invention to provide a magnetic sensor adjusting method that can always be accurate in sensing a sensing target satisfactorily irrespective of fluctuations of a sensing gap length that may occur between different magnetic sensor products or in one magnetic sensor product and that can prevent from occurring an irregularity of a phase of binarized waveform edges, a magnetic sensor adjusting device used for the method and the magnetic sensor.
According to the present invention, there is provided a method for adjusting a magnetic sensor including:
a magnet for generating a magnetic field;
a sensing target unit in which a first sensed portion and a second sensed portion are magnetically inequivalent to each other, are disposed along a moving path passing through a position opposed to the magnet through a magnetic gap, and can be moved integrally along the moving path;
a magnetic field detecting section for detecting magnetic field fluctuations in the magnetic gap based on the fact that the first sensed portions and the second sensed portions pass through the magnetic gap alternately;
a waveform processing section for binarizing detection waveform detected by the magnetic field detecting section based on a predetermined threshold; and
a threshold adjusting and setting section for setting the threshold so that it can be adjusted relatively with respect to the detection waveforms, the method comprising the steps of:
obtaining detection waveforms for a plurality of setting values by the magnetic field detecting sections while changing sensing gap lengths, which are formed between the first sensed portion or the second sensed portion and the magnetic field detecting sections in the magnetic gap, among the plurality of setting values;
calculating an intersection point level value indicated by an intersection point between a plurality of detection waveforms detected for the plurality of setting values when the plurality of detection waveforms are superimposed in phase; and
adjusting the threshold so that it agrees with the intersection point level value.
Further, according to the present invention, there is provided a device for adjusting a magnetic sensor, comprising:
a magnet for generating a magnetic field;
a sensing target unit in which a first sensed portion and a second sensed portion, which are magnetically inequivalent to each other, are disposed along a moving path passing through a position opposed to the magnet through a magnetic gap, and can be moved integrally along the moving path;
a magnetic field detecting section for detecting magnetic field fluctuations in the magnetic gap based on the fact that the first sensed portions and the second sensed portions pass through the magnetic gap alternately;
a waveform processing section for binarizing detection waveform detected by the magnetic field detecting section based on a predetermined threshold;
a threshold adjusting and setting section for setting the threshold so that it can be adjusted relatively with respect to the detection waveforms;
a sensing gap length changing and setting section for changing and setting sensing gap lengths, which are formed between the first sensed portion or the second sensed portion and the magnetic field detecting section in the magnetic gap, among a plurality of setting values;
a detection waveform obtaining section for obtaining detection waveforms for the plurality of setting values by the magnetic field detecting sections; and
an intersection point level value calculating section for calculating an intersection point level value indicated by an intersection point between a plurality of detection waveforms detected for the plurality of setting values when the plurality of detection waveforms are superimposed in phase.
Still further, according to the present invention, there is provided a magnetic sensor, comprising:
a magnet for generating a magnetic field;
a sensing target unit in which a first sensed portion and a second sensed portion, which are magnetically inequivalent to each other, are disposed along a moving path passing through a position opposed to the magnet through a magnetic gap, and can be moved integrally along the moving path;
a magnetic field detecting section for detecting magnetic field fluctuations in the magnetic gap based on the fact that the first sensed portions and the second sensed portions pass through the magnetic gap alternately;
a waveform processing section for binarizing detection waveform detected by the magnetic field detecting section based on a predetermined threshold; and
a threshold adjusting and setting section for setting the threshold so that it can be adjusted relatively with respect to the detection waveforms,
wherein a first detection waveform is obtained by changing a sensing gap length, which is defined to be a predetermined specific value between the first sensed portions or the second sensed portions and the magnetic field detecting sections in the magnetic gap, from the specific value forcibly,
a second detection waveform is obtained according to the sensing gap length that is defined to be the specific value, and
the threshold is adjusted so that it agrees with an intersection point level value that is indicated by an intersection point between the first detection waveform and the second detection waveform when the first detection waveform and the second detection waveform is superimposed in phase.
The present invention described above is applied to a magnetic sensor wherein a sensing target unit, in which first sensed portions and second sensed portions are magnetically inequivalent to each other and disposed along a predetermined moving path alternately, is opposed to a magnet through a magnetic gap, magnetic field fluctuations in the magnetic gap when an array of the two types of the sensed portions is moved integrally along the above moving path are detected by a magnetic field detecting sections, and the detection waveforms are binarized based on a predetermined threshold. When a sensing gap length between the first sensed portions or the second sensed portions and the magnetic field detecting sections varies, an amplitude of the obtained detection waveforms is changed and crests and troughs of the waveforms are broaden or sharpened accordingly but, as a result of consideration, the inventor of the present invention has found that the detection waveforms intersect each other at a substantially fixed intersection point irrespective of the sensing gap length when the waveforms that are changed by the effect of the sensing gap length are superimposed on each other so that the phases of the waveforms agree with each other (or, are in phase).
Therefore, in the present invention, a threshold for binarizing the waveforms is set so that it agrees with this intersection point level value. As described above, when a plurality of waveforms obtained by changing the sensing gap length, which intersect each other at the intersection point described above, are binarized with reference to the threshold agreeing with the intersection point level value, the phase of the binarized edges is constant irrespective of the detection waveforms and, thus, of the set values of the sensing gap length. Therefore, even when the sensing gap length fluctuates between different magnetic sensor products or in one magnetic sensor product, accuracy in sensing the sensed portions can be always set satisfactorily irrespective of the fluctuations.
Further, when the sensing gap length fluctuates, though the waveform shapes vary according to the sensing gap length, the phase of the binarized edge positions is always substantially constant. A phase relationship between the first sensed portions and the second sensed portions in the sensing target unit can be uniquely defined independently of the sensing gap length. Therefore, even when the phase of attachment of the sensing target unit must be managed, accuracy of the phase is not degraded by the fluctuations of the sensing gap length.
Still further, as the phase of both the rising edge and the falling edge occurring in the binarized waveform can be assured, the both edges can be used as detection signals with high accuracy. In this case, either one edge may be used or the resolution of the angle sensing may be increased by using the both edges.
As an example of specific effects of the present invention, when it is applied to an angle sensor for detecting a crank angle of automobiles, the phase of the binarized waveform is not affected by the sensing gap length and defined substantially uniquely by attaching the sensing target unit to a rotation axis with reference to the phase of the first sensed portions and the second sensed portions. Therefore, operations such as ignition timing control that is performed referentially can be performed more accurately.
The magnetic sensor of the present invention that is obtained by adjusting the binarization threshold according to the method of the present invention as described above is not likely to cause the unevenness of the sensing accuracy between different magnetic sensor products and is not likely to be affected by the unevenness of the sensing gap length in the array of the first sensed portions and the second sensed portions in one magnetic sensor product, the accuracy of attachment of the sensing target unit, or secular changes of the sensing gap length in the magnetic sensor that has been attached. In this case, it can be checked easily whether the binarization threshold of the magnetic sensor agrees with the intersection point level value of the waveforms as described above or not by the following procedure. Thus, in magnetic sensor products, the sensing gap length is set to a specific value unique to each product. So, either the magnet or the first and second sensed portions is moved intentionally in order to change the sensing gap length from the specified value and, then, detection waveforms before and after the change are measured. If the threshold is adjusted according to the present invention as described above, the intersection point level value obtained by superimposing the both detection waveforms in phase agrees with the threshold. Here, when the sensing gap length is changed, the change on the order of 20% of the sensing gap length set as the specific value unique to each product is sufficient to estimate the intersection point level value.
In the present invention, xe2x80x9cmagnetic inequivalencexe2x80x9d between the first sensed portions and the second sensed portions in the sensing target unit means that magnetizing conditions in the magnetic field by the magnet differ between the first sensed portions and the second sensed portions when each of the first and second sensed portions reaches the position opposite to the magnet. When the first and second sensed portions have different magnetizing conditions, the magnetic fields generated as the first sensed portions and the second sensed portions are magnetized are distributed differently and interact with the magnetic field of the magnet differently from each other (for example, orientations of combined magnetic fields). Therefore, the magnetic field distribution in the magnetic gap varies as the first sensed portions or the second sensed portions are approaching.
An example of the combination of the first sensed portions and the second sensed portions that are inequivalent magnetically is that of concave portions and convex portions made of a ferromagnetic material that have heights different from each other in the direction of the magnetic gap length. In this case, in the concave portions, the distance to the magnet or the magnetic gap length is increased and the degree of magnetization is reduced but, in the convex portions, this relationship is inverted. These concave and convex portions are desirably made of a soft magnetic material that can be magnetized easily (such as Permalloy, for example). Further, the first sensed portions and the second sensed portions may be formed as polarized regions of a permanent magnet that have polarities opposite to each other. Still further, a combination of ferromagnetic materials that differ from each other in terms of magnetic susceptibility or saturation magnetization may be used or, alternatively, one of the first and second sensed portions may be formed of a ferromagnetic material and the other may be formed of a non-magnetic material (a paramagnetic or diamagnetic material: for example, austenitic stainless steels, non-magnetic metals such as copper or aluminum and polymeric materials such as plastics).
Further, the magnet for generating the magnetic field may be either a permanent magnet or an electromagnet. The magnetic gap (and the sensing gap) may be formed by an empty space or at least a part of the magnetic gap may be filled with a non-magnetic material. Still further, the magnetic field detecting sections for detecting magnetic field fluctuations may be well-known MR elements or may be selected from various alternatives such as Hall elements, pick-up coils and magnetic heads.
When the sensing gap length is changed to calculate the intersection point level value, the range of changing the sensing gap length should be 20% to 200% of its median. If the changing range of the sensing gap length is less than 20%, a difference between the detected waveforms obtained by changing the sensing gap length may be too small to read the intersection point level value. But, if the changing range of the sensing gap length exceeds 200%, the intersection point level value defined between the waveforms may become not constant and lose their meaning as the target value for the threshold setting.
On the other hand, when the changing range of the sensing gap length falls within 20-200%, the intersection point level values when the detection waveforms are obtained with regard to three or more levels of the sensing gap lengths in this range can substantially agree with each other within a deviation of 20% and, therefore, sufficient accuracy in setting the threshold can be maintained even if the sensing gap lengths used for the measurement are somewhat uneven. For example, when the detection waveforms are obtained by using three or more levels of the sensing gap lengths, the intersection point levels between the waveforms may sometimes not agree with each other. But, so long as their deviation stays within the range described above, the intersection point levels can be considered to be in agreement with each other substantially. In this case, any of the intersection point levels may be selected as the threshold with which the intersection point levels agree or the threshold may agree with an average value of these intersection point levels. Further, in the present invention, when a plurality of intersection point levels are determined to set the threshold as described above, too, so long as the deviation between the threshold and each intersection point level stays within 20%, these values can conceptually be considered to be in agreement with each other.
Therefore, in the easiest way, there can be exemplified a method, wherein the sensing gap length is changed between two levels and an intersection point level value of two detection waveforms obtained according to the two sensing gap lengths is calculated as a target value with which the threshold should agree. In this case, in order to adequately bring out the effect of the present invention, it is desirable to set the two levels of the sensing gap lengths so that the difference between them is as large as possible within the preferable changing range described above.
The magnetic sensor to which the present invention is applied may be a rotational sensor, in which the sensing target unit is a body of revolution, a locus of a circumferential side surface about a rotation axis line of the body of revolution constitutes a moving path, and the first sensed portions and the second sensed portions are disposed alternately along the circumferential side surface. By adopting the present invention, the accuracy in detecting the angular phase of rotation can be improved significantly. However, the present invention is not limited to rotational sensors but may also be applied to length measuring sensors such as linear encoders, for example.
Next, in the present invention, in order to change the sensing gap length of the magnetic sensor, the first and second sensed portions and the magnetic field detecting sections must be moved relatively. But, in terms of mass production of the magnetic sensors, it is quite cumbersome and, therefore, not practical, to change the mounting position of the magnetic field detecting sections in the manufacturing process. Therefore, it is effective to adopt a method in which an adjustment is performed by replacing a normal sensing target unit with a sensing target unit dedicated for the adjustment and, then, the normal sensing target unit is attached. Once the adjustment according to the present invention is completed, the magnetic sensor is hardly affected even if the sensing gap length is somewhat uneven when the normal sensing target unit is attached.
In this case, though the adjustment may be performed by successively changing a plurality of sensing target units for adjustment, which are prepared in advance to have sensing gap lengths different from each other, and measuring the detection waveforms corresponding to the respective adjusting sensing target units individually, it is cumbersome to change the adjusting sensing target units and the adjustment may be affected by errors in attachment when the adjusting sensing target units are changed.
Therefore, in the present invention, the adjusting method as described below can be adopted. Thus, in place of the normal sensing target unit having a constant sensing gap length, a variable-gap sensing target unit for adjustment, in which segments having different sensing gap lengths coexist, is attached to the magnetic sensor while the magnet is attached to a fixed position and, then, sensing waveforms according to the first and second sensed portions are obtained for each of the segments of the variable-gap sensing target unit having different sensing gap lengths.
In this case, the adjusting device of the present invention can be constituted as follows. Thus, a sensing gap changing and setting means comprises a variable-gap sensing target unit for adjustment, which is attached to a magnetic sensor to be adjusted temporarily in place of a normal sensing target unit having a uniform sensing gap length and in which segments having different sensing gap lengths coexist. Then, a detection waveform obtaining means obtains sensing waveforms according to first and second sensed portions for each of the segments of the variable-gap sensing target unit having different sensing gap lengths.
According to the method and device of the present invention described above, as the segments having the different sensing gap lengths coexist in one variable-gap sensing target unit, a plurality of detection waveforms for calculating an intersection point level value can be obtained at a time without changing adjusting sensing target units and, as a result, an adjustment process can be simplified. Further, as the process to change the adjusting sensing target units is not needed, there is no possibility that the adjustment is affected by errors in attaching the adjusting sensing target units.
For example, in the case of a rotational sensor, in which a normal sensing target unit is a body of revolution, a locus of a circumferential side surface about a rotation axis line of the body of revolution constitutes a moving path, and first sensed portions and second sensed portions are disposed alternately along the circumferential side surface, it is possible to use a variable-gap sensing target unit, in which a plurality of segments having turning radii different from each other are disposed along the circumferential side surface of a body of revolution and first sensed portions and second sensed portions are disposed in each segment so that the plurality of segments have sensing gap lengths that are defined according to the turning radii and, therefore, different from each other. In this case, by dividing the circumferential side surface of the body of revolution into equiangular segments so that the turning radii are different between the adjacent equiangular segments and, therefore, the sensing gap lengths are changed every specified angular period (for example, 180xc2x0), detection waveforms corresponding to the sensing gap lengths that are changed every specified angular period can be obtained and processes for determining the intersection point level value, such as dividing the waveforms and superimposing them in phase, can be performed easily and with high accuracy.
In this connection, as the detection waveforms detected by the magnetic field detecting sections often vary depending on temperature characteristics of the detecting sections and signal processing circuits, even if the magnetic sensor is adjusted so that the threshold agrees with the intersection point level value at a given temperature, the threshold may be deviated from the intersection point level value as the temperature varies and detection accuracy may be degraded. However, when the adjustment is performed once so that the threshold agrees with the intersection point level value but, after that, the threshold is deviated from the intersection point level value again due to the temperature fluctuations, if an attempt is made to eliminate this difference by changing the threshold relative to the waveforms, the threshold will be deviated from the intersection point level value again at the temperature at which the adjustment has been performed initially and, after all, the adjustment condition cannot be assured over all temperature ranges as intended. Further, though it is not impossible to correct the threshold to follow the temperature change, this solution is not practical because it complicates the sensor system.
In view of the above problem, in the magnetic sensor to which the present invention is applied, it is desirable to provide a temperature correcting section for correcting temperature-dependent fluctuations of the detection waveforms detected by the magnetic field detecting sections and set a correction coefficient by the temperature correcting section so that the binarization threshold of the detection waveforms agrees with the intersection point level value over all predetermined temperature ranges. In other words, after the adjustment is performed so that the threshold agrees with the intersection point level value at a given temperature once, any difference between the threshold and the intersection point level value due to the temperature fluctuations is eliminated by adjusting the correction coefficient of the temperature correcting section. As a result, the adjustment condition of the threshold can be assured over all necessary temperature ranges as intended.
As a specific method, the correction coefficient is set by obtaining two detection waveforms by the magnetic field detecting sections and allowing the threshold to agree with a first intersection point level value, which is determined by the two detection waveforms, by the threshold adjusting and setting section while a temperature is set to a first temperature and two levels of sensing gap lengths are used; and, in this condition, obtaining two detection waveforms by the magnetic field detecting sections again and calculating a second intersection point level value determined by the two detection waveforms that are detected again while the threshold set by the threshold adjusting and setting section is not changed, the temperature is changed to a second temperature that is different from the first temperature and two levels of sensing gap lengths are used; and setting the correction coefficient so that the second intersection point level value agrees with the threshold.
According to this method, by setting only two levels of measured temperatures, the agreement between the threshold and the intersection point level value can be obtained easily in a temperature-compensated manner around the measured temperatures and, as a result, the magnetic sensor that is not susceptible not only to unevenness of the sensing gap length but also to temperature fluctuations can be obtained.